# load necessary libraries
library(Seurat)
library(dplyr)
library(ggplot2)
library(CelltypeR)
Read in the flow data This data should be the gated live cells.
All samples need to be in one folder. Here we have
sampleNames(flowset)
[1] "MBO_154d_AIW_n1_Live_Live.fcs"
[2] "MBO_154d_AIW_n2_Live_Live.fcs"
[3] "MBO_154d_AIW_n3_Live_Live.fcs"
[4] "MBO_154d_AIW_n4_Live_Live.fcs"
[5] "MBO_30d_AIW_n1_Single Cells_Live_Live.fcs"
[6] "MBO_30d_AIW_n2_Single Cells_Live_Live.fcs"
[7] "MBO_30d_AIW_n3_Single Cells_Live_Live.fcs"
[8] "MBO_30d_AIW_n4_Single Cells_Live_Live.fcs"
[9] "MBO_60d_AIW_n1_Live_Live.fcs"
[10] "MBO_60d_AIW_n2_Live_Live.fcs"
[11] "MBO_60d_AIW_n3_Live_Live.fcs"
[12] "MBO_60d_AIW_n4_Live_Live.fcs"
[13] "MBO_97d_AIW_n1_Live_Live.fcs"
[14] "MBO_97d_AIW_n2_Live_Live.fcs"
[15] "MBO_97d_AIW_n3_Live_Live.fcs"
[16] "MBO_97d_AIW_n4_Live_Live.fcs"
Rename samples with shorter names
sampleNames(flowset) <- sampleNames(flowset) <- c("AIW_150_R1","AIW_150_R2","AIW_150_R3","AIW_150_R4",
"AIW_30_R1","AIW_30_R2","AIW_30_R3","AIW_30_R4",
"AIW_60_R1","AIW_60_R2","AIW_60_R3","AIW_60_R4",
"AIW_100_R1","AIW_100_R2","AIW_100_R3","AIW_100_R4"
)
sampleNames(flowset)
[1] "AIW_150_R1" "AIW_150_R2" "AIW_150_R3" "AIW_150_R4"
[5] "AIW_30_R1" "AIW_30_R2" "AIW_30_R3" "AIW_30_R4"
[9] "AIW_60_R1" "AIW_60_R2" "AIW_60_R3" "AIW_60_R4"
[13] "AIW_100_R1" "AIW_100_R2" "AIW_100_R3" "AIW_100_R4"
Harmonize data to remove batch or technical variation
This requires us to look and see where there are two peaks to align. We need to visualize the peaks of the transformed data before aligning.
colnames(df)
[1] "FSC" "FSC" "FSC" "SSC" "SSC"
[6] "SSC" "CD56" "CD56" "CD56" "SSEA4"
[11] "SSEA4" "SSEA4" "CD140a" "CD140a" "CD140a"
[16] "CD29" "CD29" "CD29" "CD44" "CD44"
[21] "CD44" "LiveDead" "LiveDead" "LiveDead" "CD184"
[26] "CD184" "CD184" "CD24" "CD24" "CD24"
[31] "CD15" "CD15" "CD15" "TH" "TH"
[36] "TH" "CD49f" "CD49f" "CD49f" "CD133"
[41] "CD133" "CD133" "Time" "Sample" "cell"
Now we have made all the different processing of the fsc files. We can visualize the intensity in cell density plots to see the alignment
#plotdensity_flowset(flowset)
plotdensity_flowset(flowset_biexp)
Warning in melt(lapply(as.list(flowset@frames), function(x) { :
The melt generic in data.table has been passed a list and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(lapply(as.list(flowset@frames), function(x) { x = as.data.frame(x@exprs)})). In the next version, this warning will become an error.
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
Warning in geom_density_ridges(alpha = 0.4, verbose = FALSE) :
Ignoring unknown parameters: `verbose`
Picking joint bandwidth of 0.106
Picking joint bandwidth of 0.0931
Picking joint bandwidth of 0.0233
Picking joint bandwidth of 0.124
Picking joint bandwidth of 0.107
Picking joint bandwidth of 0.023
Picking joint bandwidth of 0.224
Picking joint bandwidth of 0.202
Picking joint bandwidth of 0.396
Picking joint bandwidth of 0.236
Picking joint bandwidth of 0.166
Picking joint bandwidth of 0.199
Picking joint bandwidth of 0.25
Picking joint bandwidth of 0.232
Picking joint bandwidth of 0.374
Picking joint bandwidth of 0.227
Picking joint bandwidth of 0.212
Picking joint bandwidth of 0.352
Picking joint bandwidth of 0.281
Picking joint bandwidth of 0.24
Picking joint bandwidth of 0.325
Picking joint bandwidth of 0.213
Picking joint bandwidth of 0.152
Picking joint bandwidth of 0.172
Picking joint bandwidth of 0.351
Picking joint bandwidth of 0.265
Picking joint bandwidth of 0.407
Picking joint bandwidth of 0.246
Picking joint bandwidth of 0.236
Picking joint bandwidth of 0.195
Picking joint bandwidth of 0.234
Picking joint bandwidth of 0.222
Picking joint bandwidth of 0.394
Picking joint bandwidth of 0.309
Picking joint bandwidth of 0.281
Picking joint bandwidth of 0.398
Picking joint bandwidth of 0.343
Picking joint bandwidth of 0.275
Picking joint bandwidth of 0.337
Picking joint bandwidth of 0.236
Picking joint bandwidth of 0.205
Picking joint bandwidth of 0.34
Picking joint bandwidth of 0.14
plotdensity_flowset(flowset_align)
Warning in melt(lapply(as.list(flowset@frames), function(x) { :
The melt generic in data.table has been passed a list and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(lapply(as.list(flowset@frames), function(x) { x = as.data.frame(x@exprs)})). In the next version, this warning will become an error.
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
No id variables; using all as measure variables
Warning in geom_density_ridges(alpha = 0.4, verbose = FALSE) :
Ignoring unknown parameters: `verbose`
Picking joint bandwidth of 0.105
Picking joint bandwidth of 0.0921
Picking joint bandwidth of 0.0231
Picking joint bandwidth of 0.123
Picking joint bandwidth of 0.106
Picking joint bandwidth of 0.023
Picking joint bandwidth of 0.224
Picking joint bandwidth of 0.202
Picking joint bandwidth of 0.395
Picking joint bandwidth of 0.232
Picking joint bandwidth of 0.164
Picking joint bandwidth of 0.201
Picking joint bandwidth of 0.251
Picking joint bandwidth of 0.232
Picking joint bandwidth of 0.372
Picking joint bandwidth of 0.226
Picking joint bandwidth of 0.208
Picking joint bandwidth of 0.35
Picking joint bandwidth of 0.269
Picking joint bandwidth of 0.238
Picking joint bandwidth of 0.325
Picking joint bandwidth of 0.213
Picking joint bandwidth of 0.152
Picking joint bandwidth of 0.172
Picking joint bandwidth of 0.351
Picking joint bandwidth of 0.266
Picking joint bandwidth of 0.409
Picking joint bandwidth of 0.247
Picking joint bandwidth of 0.238
Picking joint bandwidth of 0.196
Picking joint bandwidth of 0.235
Picking joint bandwidth of 0.223
Picking joint bandwidth of 0.393
Picking joint bandwidth of 0.303
Picking joint bandwidth of 0.281
Picking joint bandwidth of 0.399
Picking joint bandwidth of 0.338
Picking joint bandwidth of 0.272
Picking joint bandwidth of 0.336
Picking joint bandwidth of 0.232
Picking joint bandwidth of 0.202
Picking joint bandwidth of 0.337
Picking joint bandwidth of 0.14
#plotdensity_flowset(flowset_retro)
AB <- c("TH","CD24","CD56","CD29","CD15","CD184","CD133","SSEA4","CD44","CD49f","CD140a")
df_select <- df %>% select(c("TH","CD24","CD56","CD29","CD15","CD184","CD133","SSEA4","CD44","CD49f","CD140a","Sample"))
seu <- make_seu(df_select, AB_vector = AB)
Centering and scaling data matrix
|
| | 0%
|
|====================================================================| 100%
Warning in irlba(A = t(x = object), nv = npcs, ...) :
You're computing too large a percentage of total singular values, use a standard svd instead.
Warning: Requested number is larger than the number of available items (11). Setting to 11.
Warning: Requested number is larger than the number of available items (11). Setting to 11.
Warning: Requested number is larger than the number of available items (11). Setting to 11.
Warning: Requested number is larger than the number of available items (11). Setting to 11.
Warning: Requested number is larger than the number of available items (11). Setting to 11.
PC_ 1
Positive: CD24, CD15, CD29, CD140a, CD56, CD133
Negative: TH, SSEA4, CD49f, CD44, CD184
PC_ 2
Positive: CD15, CD24, CD140a, CD56, TH, SSEA4
Negative: CD44, CD133, CD29, CD49f, CD184
PC_ 3
Positive: CD44, CD15, CD24, CD140a, CD29, CD56
Negative: CD184, CD49f, CD133, TH, SSEA4
PC_ 4
Positive: CD184, CD44, CD15, CD24, TH, CD56
Negative: CD29, CD133, SSEA4, CD140a, CD49f
PC_ 5
Positive: CD56, CD49f, TH, CD133, CD24, CD15
Negative: SSEA4, CD184, CD140a, CD29, CD44
You can save the data frame and seurat object for later
# to save the df for later
write.csv(df, paste(output_path,"df2000Timecourse4.csv", sep = ""))
# save the seurat object
saveRDS(seu, paste(output_path, "seuratObjectTimecourseAIW_4.RDS", sep = ""))
Check out the data object
RidgePlot(seu, features = AB, log = TRUE)
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Scale for x is already present.
Adding another scale for x, which will replace the existing scale.
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0762
Warning: Removed 709 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.061
Warning: Removed 311 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0553
Warning: Removed 235 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0564
Warning: Removed 230 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0572
Warning: Removed 488 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0872
Warning: Removed 1453 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0602
Warning: Removed 311 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0597
Warning: Removed 2300 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0621
Warning: Removed 713 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.0817
Warning: Removed 1088 rows containing non-finite values (`stat_density_ridges()`).
Warning in self$trans$transform(x) : NaNs produced
Warning: Transformation introduced infinite values in continuous x-axis
Picking joint bandwidth of 0.06
Warning: Removed 718 rows containing non-finite values (`stat_density_ridges()`).
DimPlot(seu, group.by = "Sample")
# note the dimensions (number of PC to include needs to be one less than the number in the antibody panel)
explore_param(input = seu,
cluster_method = "louvain",
df_input = df.input,
flow_k = NULL,
pheno_lou_kn = c(80,120,200),
lou_resolution = c(0.6),
pcdim = 1:10,
run.plot = TRUE,
run.stats = FALSE,
save_to = NULL)
Computing nearest neighbor graph
Computing SNN
13:40:53 UMAP embedding parameters a = 0.9922 b = 1.112
13:40:53 Read 32000 rows and found 10 numeric columns
13:40:53 Using Annoy for neighbor search, n_neighbors = 80
13:40:53 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:40:57 Writing NN index file to temp file /var/folders/k4/khtkczkd5tn732ftjpwgtr240000gn/T//RtmpcsjJYG/file2f9173d2fe46
13:40:57 Searching Annoy index using 1 thread, search_k = 8000
13:41:33 Annoy recall = 100%
13:41:34 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 80
13:41:39 Initializing from normalized Laplacian + noise (using irlba)
13:41:41 Commencing optimization for 200 epochs, with 3116580 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:42:24 Optimization finished
[1] "finding neighbours for kn 80"
Warning: The following arguments are not used: reduction
Warning: The following arguments are not used: reduction
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 32000
Number of edges: 4000185
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.8744
Number of communities: 13
Elapsed time: 26 seconds
[1] "completed louvain kn 80 resolution 0.6"
[1] 32000
Computing nearest neighbor graph
Computing SNN
13:43:41 UMAP embedding parameters a = 0.9922 b = 1.112
13:43:41 Read 32000 rows and found 10 numeric columns
13:43:41 Using Annoy for neighbor search, n_neighbors = 120
13:43:41 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:43:45 Writing NN index file to temp file /var/folders/k4/khtkczkd5tn732ftjpwgtr240000gn/T//RtmpcsjJYG/file2f912133e112
13:43:45 Searching Annoy index using 1 thread, search_k = 12000
13:44:34 Annoy recall = 100%
13:44:35 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 120
13:44:42 Initializing from normalized Laplacian + noise (using irlba)
13:44:46 Commencing optimization for 200 epochs, with 3950280 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:45:33 Optimization finished
[1] "finding neighbours for kn 120"
Warning: The following arguments are not used: reduction
Warning: The following arguments are not used: reduction
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 32000
Number of edges: 5858818
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.8655
Number of communities: 13
Elapsed time: 41 seconds
[1] "completed louvain kn 120 resolution 0.6"
[1] 32000
Computing nearest neighbor graph
Computing SNN
13:47:25 UMAP embedding parameters a = 0.9922 b = 1.112
13:47:25 Read 32000 rows and found 10 numeric columns
13:47:25 Using Annoy for neighbor search, n_neighbors = 200
13:47:25 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:47:29 Writing NN index file to temp file /var/folders/k4/khtkczkd5tn732ftjpwgtr240000gn/T//RtmpcsjJYG/file2f9154fd75c5
13:47:30 Searching Annoy index using 1 thread, search_k = 20000
13:48:48 Annoy recall = 100%
13:48:49 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 200
13:49:01 Initializing from normalized Laplacian + noise (using irlba)
13:49:06 Commencing optimization for 200 epochs, with 4802826 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
13:49:59 Optimization finished
[1] "finding neighbours for kn 200"
Warning: The following arguments are not used: reduction
Warning: The following arguments are not used: reduction
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 32000
Number of edges: 9488963
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.8514
Number of communities: 10
Elapsed time: 68 seconds
[1] "completed louvain kn 200 resolution 0.6"
[1] 32000
$cluster
NULL
# this function does not add the clustering to the seurat object it is to explore and run stats. If you choose save = output_path then you will save a seurat object with the clustering, one for each kn.
After checking parameters run cluster function to make add the clustering information into the
seu <- get_clusters(seu, method = "louvain",
df_input = df.input,
k = 80,
resolution = c(1),
plots = TRUE,
save_plots = FALSE)
Computing nearest neighbor graph
Computing SNN
Modularity Optimizer version 1.3.0 by Ludo Waltman and Nees Jan van Eck
Number of nodes: 32000
Number of edges: 4000185
Running Louvain algorithm...
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Maximum modularity in 10 random starts: 0.8450
Number of communities: 18
Elapsed time: 26 seconds
[1] "method is Louvain"
15:38:49 UMAP embedding parameters a = 0.4502 b = 1.076
15:38:49 Read 32000 rows and found 10 numeric columns
15:38:49 Using Annoy for neighbor search, n_neighbors = 80
15:38:49 Building Annoy index with metric = cosine, n_trees = 50
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
15:38:54 Writing NN index file to temp file /var/folders/k4/khtkczkd5tn732ftjpwgtr240000gn/T//RtmpcsjJYG/file2f9146a08787
15:38:54 Searching Annoy index using 1 thread, search_k = 8000
15:39:30 Annoy recall = 100%
15:39:31 Commencing smooth kNN distance calibration using 1 thread with target n_neighbors = 80
15:39:36 Initializing from normalized Laplacian + noise (using irlba)
15:39:39 Commencing optimization for 200 epochs, with 3116580 positive edges
Using method 'umap'
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
15:40:21 Optimization finished
# if save_plots is TRUE the feature plots will be save as 13 plots in one file. The UMAP with cluster numbers will also be saved.
Visualize expression on UMAP and with heat maps
AB <- c("TH","CD24","CD56","CD29","CD15","CD184","CD133","SSEA4","CD44","CD49f","CD140a")
# the cluster labels will match the active ident
Idents(seu) <- "RNA_snn_res.1"
# this will let us see one at at time
for (i in AB) {
print(FeaturePlot(seu, features = i, min.cutoff = 'q1', max.cutoff = 'q97', label = TRUE))
}
NA
NA
Visualize your reference matrix
df <- read.csv("/Users/rhalenathomas/GITHUB/CelltypeR/ExampleOuts/ReferenceMatrixPanel2.csv")
# we need to remove the marker column and add these are row names
rownames(df) <- df$X
df <- df %>% select(-"X")
# heatmap function take a matix
mat <- as.matrix(df)
heatmap(mat,
Rowv = NA, # Don't cluster rows
Colv = NA, # Don't cluster columns
col = colorRampPalette(c("white", "blue"))(100), # Define a color palette
main = "Reference Matrix")
NA
NA
NA
Some more visualization of expression values
Skip for now
saveRDS(seu, paste(output_path, "Seurat_temp.RDS", sep = ""))
Predict cell annotations with CAM (Correlations assignment method)
df2$X <- df2(rownames)
Error in df2(rownames) : could not find function "df2"
Visualize the CAM results
plot_corr(cor)
Warning in melt(df) :
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(df). In the next version, this warning will become an error.
Using X, best.cell.type, second.cell.type, cell.label as id variables
Warning in melt(df.downsample) :
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(df.downsample). In the next version, this warning will become an error.
Using X, best.cell.type, second.cell.type, cell.label as id variables
Warning in melt(double.cells) :
The melt generic in data.table has been passed a data.frame and will attempt to redirect to the relevant reshape2 method; please note that reshape2 is deprecated, and this redirection is now deprecated as well. To continue using melt methods from reshape2 while both libraries are attached, e.g. melt.list, you can prepend the namespace like reshape2::melt(double.cells). In the next version, this warning will become an error.
Using X, best.cell.type, second.cell.type, cell.label as id variables
[[1]]
[[2]]
[[3]]
[[4]]
[[5]]
[[6]]
Warning: Removed 2 rows containing missing values (`geom_line()`).
Warning: Removed 2 rows containing missing values (`geom_point()`).
[[7]]
Warning: Removed 353 rows containing missing values (`geom_line()`).
Warning: Removed 353 rows containing missing values (`geom_point()`).
Apply correlation predictions to clusters and output a vector for annotation functions
Run get annotations function to return a vector of annotation in the order of the clusters.
cor.ann <- get_annotation(seu, seu.cluster = seu$RNA_snn_res.1,
seu.label = seu$cor.labels, top_n = 3,
filter_out = c("Unknown","unknown","Mixed"),
Label = "CAM")
[1] "filtering"
cor.ann
dim(cor.ann)
[1] 18 2
unique(cor.ann$CAM)
[1] NPCDA Astrocyte Neuron RG
[5] NeuronDA-Neuron RadialGliaDiv opc Oligos
80 Levels: Astrocyte Astrocyte-Endothelial Astrocyte-NPCDA ... unknown
length(cor.ann$CAM)
[1] 18
Use a trained Random Forest model to predict cell types. Training of the Random Forest model with an annotated data set is below.
table(seu$rfm.labels)
Unknown Mixed Neurons 1 Radial Glia 1
41 14711 1211 7
Epithelial Astrocytes 1 Neurons 2 Astrocytes 2
2434 10121 1 2018
Astrocytes 3 Astrocytes mature Neurons 3 NPC
456 14 499 480
Radial Glia 2 Radial Glia 3 Endothelial Oligodendrocytes
7 0 0 0
Stem-like 1 Stem-like 2 Neural stem
0 0 0
Get the annotation by cluster for the RFM
rfm.ann <- get_annotation(seu, seu$RNA_snn_res.1,seu$rfm.labels,
top_n = 3, filter_out = c("unknown","Unknown","Mixed","Mix"), Label = "RFM")
[1] "filtering"
rfm.ann
#rfm.ann <- get_annotation(seu, seu$RNA_snn_res.0.8,seu$rfm.labels,
# top_n = 3, filter_out = FALSE, Label = "RFM")
rfm.ann
dim(rfm.ann)
[1] 18 2
Plot RFM predictions
plot_lab_clust(seu, seu.cluster = seu$RNA_snn_res.1, seu.labels = seu$rfm.labels, filter_out = c("unknown","Unknown","Mixed"))
NA
NA
# save the predictions so far
saveRDS(seu, paste(output_path, "SeuratSubTimeline.RDS", sep = ""))
Predicting cell types with Seurat label transfer using anchors
proteins <- c("TH","CD24","CD56","CD29","CD15","CD184",
"CD133","SSEA4","CD44","CD49f","CD140a")
genes <- c("CD24","NCAM1","ITGB1","FUT4",
"CXCR4","PROM1","CD44","PDGFRA","TH",
"ST3GAL2","ITGA6")
all <- c(proteins,genes)
# the output is a seurat object with the predicted annotations
seu <- seurat_predict(seu, seu.r, ref_id = 'subgroups', down.sample = 500, markers = all)
Warning: 11 features of the features specified were not present in both the reference query assays.
Continuing with remaining 11 features.
Projecting cell embeddings
Finding neighborhoods
Finding anchors
Found 3073 anchors
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Warning: Requested number is larger than the number of available items (13). Setting to 13.
Filtering anchors
Retained 1155 anchors
Finding integration vectors
Finding integration vector weights
0% 10 20 30 40 50 60 70 80 90 100%
[----|----|----|----|----|----|----|----|----|----|
**************************************************|
Predicting cell labels
Get a consensus of cluster annotations, Add the annotations to the seurat object
# make a list of data frames
# all the dataframes need to be as.factor
ann.list <- list(cor.ann,rfm.ann,seu.ann.ft, man.ann)
# annotate the seurat object
seu <- cluster_annotate(seu, ann.list = ann.list,
annotation_name ="CellType",
to_label = "RNA_snn_res.1")
DimPlot(seu, group.by = "CellType")
NA
NA
NA
NA
Just use the annotate functions
We first need to add the variables into the seurat object that we want to compare.
Idents(seu) <- 'Sample'
levels(seu)
[1] "AIW_150_R1" "AIW_150_R2" "AIW_150_R3" "AIW_150_R4" "AIW_30_R1" "AIW_30_R2"
[7] "AIW_30_R3" "AIW_30_R4" "AIW_60_R1" "AIW_60_R2" "AIW_60_R3" "AIW_60_R4"
[13] "AIW_100_R1" "AIW_100_R2" "AIW_100_R3" "AIW_100_R4"
Age <- c("150","150","150","150",
"30","30","30","30",
"60","60","60","60",
"100","100","100","100")
Replicate <- c("R1","R2","R3","R4",
"R1","R2","R3","R4",
"R1","R2","R3","R4",
"R1","R2","R3","R4")
# vector with the new names - you need this vector from me
cluster.ids <- Age
names(cluster.ids) <- levels(seu) # get the levels
seu <- RenameIdents(seu, cluster.ids) # rename
seu$Days_in_FD <- Idents(seu) # add a new dataslot
Plots some variables to look for differences between groups
proportionplots(seu.q,seu.var = seu$Days_in_FD, seu.lable = seu$CelltypesMain, groups = "Days_in_FD", my_colours = colours)
[1] "Number of colours needed15"
[1] "Number of colours entered 18"
[1] "Custome colours used."
# now check with more distinctive cell types
proportionplots(seu.q,seu.var = seu$Days_in_FD, seu.lable = seu$Celltypes2, groups = "Days_in_FD", my_colours = colours)
[1] "Number of colours needed18"
[1] "Number of colours entered 18"
[1] "Custome colours used."
Make a heat map
# dot plot
var_names <- c("earlyDA-NPC","earlyGlia","Neurons","Astrocytes","stem-like",
"epithelial","earlyRG","DAneurons", "RG", "DA-NPC","earlyNeurons",
"epithelial and precursors","Glia", "NPC","OPC")
# make sure the terms are exactly the same and you don't miss any
new.order <- c("stem-like","epithelial and precursors",
"earlyDA-NPC","earlyGlia","earlyRG","OPC","NPC","DA-NPC",
"earlyNeurons","Neurons","DAneurons","epithelial","Astrocytes","Glia","RG"
)
new.order <- rev(new.order)
AB.order <- c("TH","CD24","CD56","CD29","CD15","CD184",
"CD133","SSEA4","CD44","CD49f","CD140a")
plotmean(plot_type = 'dotplot',seu = seu, group = 'CelltypesMain', markers = AB,
var_names = var_names, slot = 'scale.data', xlab = "Cell Type",
ylab = "Antibody", var1order = new.order, var2order = AB.order)
NA
NA
Look at some things across time
table(seu$Celltypes2,seu$Days_in_FD)
150 30 60 100
earlyDA-NPC 365 563 1075 950
earlyGlia 339 1124 851 403
Neurons 267 727 995 532
Astrocytes1 622 512 491 864
stem-like 566 1168 261 423
epithelial 1324 105 289 689
RG-fetal-astro 280 1159 288 528
Astrocytes2 394 409 560 692
DAneurons 240 403 773 556
RG-astro 928 210 292 439
DANPC 135 542 769 339
Neurons_early 240 539 502 173
epithelialprecursor 582 191 326 331
Glia 890 10 91 242
NPC 161 181 224 613
OPC 243 70 111 104
precursors 130 84 102 122
stem-like-RG 294 3 0 0
New cell type names based on if cell types are changing the same over time
Save the Seurat object
saveRDS(seu, paste(output_path, "SeuratSubTimeline.RDS", sep = ""))
Train the Random Forest model
# use Revised Celltype
# use all Markers
rf <- RFM_train(seurate_object = seu,
AB_list = AB,
annotations = seu$CellTypes,
split = c(0.8,0.2),
downsample = 1000,
seed = 222,
mytry = c(1:10),
maxnodes = c(12: 25),
trees = c(250, 500, 1000,2000),
start_node = 15)
[1] "optimize number of features to draw"
[1] "Best number of features to draw is 10"
[1] "Max accuracy is 0.837131944339069"
[1] "Searching for best max node size"
[1] "The max accuracy is 0.85. For the maxnodes of 23"
[1] "searching for best number of trees"
[1] "Best trees 2000"
[1] "The max accuracy is 0.831325301204819. For 2000 trees"
[1] "predict training data"
Confusion Matrix and Statistics
Reference
Prediction earlyDA-NPC earlyGlia Neurons Astrocytes stem-like
earlyDA-NPC 79 3 0 3 0
earlyGlia 0 49 0 0 0
Neurons 0 0 56 0 1
Astrocytes 0 0 0 105 0
stem-like 0 5 0 0 68
epithelial 0 0 1 0 0
earlyRG 0 2 0 0 0
DAneurons 0 0 0 0 0
RG-astro 0 2 0 1 0
DA-NPC 2 3 1 0 3
earlyNeurons 0 0 0 0 0
epithelial-endothelial 0 0 0 1 0
Glia 0 0 0 0 0
NPC 0 0 0 0 0
OPC 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0
glia-maybeOligo 0 0 0 0 0
Reference
Prediction epithelial earlyRG DAneurons RG-astro DA-NPC earlyNeurons
earlyDA-NPC 0 5 0 4 2 0
earlyGlia 0 2 0 0 0 0
Neurons 1 0 3 0 0 3
Astrocytes 0 1 0 0 0 0
stem-like 0 3 0 0 0 1
epithelial 72 0 0 1 0 2
earlyRG 0 61 0 0 0 0
DAneurons 0 0 4 0 0 0
RG-astro 1 0 0 22 0 0
DA-NPC 2 0 38 6 52 0
earlyNeurons 1 0 0 0 0 29
epithelial-endothelial 0 0 0 0 0 0
Glia 0 0 0 0 0 0
NPC 2 0 0 0 0 0
OPC 0 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0 0
glia-maybeOligo 0 0 0 0 0 0
Reference
Prediction epithelial-endothelial Glia NPC OPC epithelial-maybeOligo
earlyDA-NPC 3 1 0 0 0
earlyGlia 2 0 0 0 0
Neurons 1 0 0 0 0
Astrocytes 1 1 0 0 0
stem-like 1 2 0 0 2
epithelial 3 5 2 7 0
earlyRG 2 0 0 0 0
DAneurons 0 0 0 0 0
RG-astro 0 7 0 5 0
DA-NPC 15 4 0 1 0
earlyNeurons 2 0 0 1 1
epithelial-endothelial 10 0 0 0 0
Glia 0 1 0 0 0
NPC 0 0 25 0 3
OPC 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0
glia-maybeOligo 0 0 0 0 0
Reference
Prediction glia-maybeOligo
earlyDA-NPC 0
earlyGlia 0
Neurons 0
Astrocytes 0
stem-like 0
epithelial 1
earlyRG 0
DAneurons 0
RG-astro 0
DA-NPC 0
earlyNeurons 0
epithelial-endothelial 0
Glia 0
NPC 0
OPC 0
epithelial-maybeOligo 0
glia-maybeOligo 5
Overall Statistics
Accuracy : 0.7809
95% CI : (0.7509, 0.8088)
No Information Rate : 0.1346
P-Value [Acc > NIR] : < 2.2e-16
Kappa : 0.7609
Mcnemar's Test P-Value : NA
Statistics by Class:
Class: earlyDA-NPC Class: earlyGlia Class: Neurons
Sensitivity 0.97531 0.76562 0.96552
Specificity 0.97147 0.99469 0.98814
Pos Pred Value 0.79000 0.92453 0.86154
Neg Pred Value 0.99721 0.98037 0.99734
Prevalence 0.09914 0.07834 0.07099
Detection Rate 0.09670 0.05998 0.06854
Detection Prevalence 0.12240 0.06487 0.07956
Balanced Accuracy 0.97339 0.88016 0.97683
Class: Astrocytes Class: stem-like Class: epithelial
Sensitivity 0.9545 0.94444 0.91139
Specificity 0.9958 0.98121 0.97019
Pos Pred Value 0.9722 0.82927 0.76596
Neg Pred Value 0.9929 0.99456 0.99032
Prevalence 0.1346 0.08813 0.09670
Detection Rate 0.1285 0.08323 0.08813
Detection Prevalence 0.1322 0.10037 0.11506
Balanced Accuracy 0.9752 0.96283 0.94079
Class: earlyRG Class: DAneurons Class: RG-astro Class: DA-NPC
Sensitivity 0.84722 0.088889 0.66667 0.96296
Specificity 0.99463 1.000000 0.97959 0.90170
Pos Pred Value 0.93846 1.000000 0.57895 0.40945
Neg Pred Value 0.98537 0.949569 0.98588 0.99710
Prevalence 0.08813 0.055080 0.04039 0.06610
Detection Rate 0.07466 0.004896 0.02693 0.06365
Detection Prevalence 0.07956 0.004896 0.04651 0.15545
Balanced Accuracy 0.92093 0.544444 0.82313 0.93233
Class: earlyNeurons Class: epithelial-endothelial Class: Glia
Sensitivity 0.82857 0.25000 0.047619
Specificity 0.99361 0.99871 1.000000
Pos Pred Value 0.85294 0.90909 1.000000
Neg Pred Value 0.99234 0.96278 0.975490
Prevalence 0.04284 0.04896 0.025704
Detection Rate 0.03550 0.01224 0.001224
Detection Prevalence 0.04162 0.01346 0.001224
Balanced Accuracy 0.91109 0.62436 0.523810
Class: NPC Class: OPC Class: epithelial-maybeOligo
Sensitivity 0.92593 0.00000 0.000000
Specificity 0.99367 1.00000 1.000000
Pos Pred Value 0.83333 NaN NaN
Neg Pred Value 0.99746 0.98286 0.992656
Prevalence 0.03305 0.01714 0.007344
Detection Rate 0.03060 0.00000 0.000000
Detection Prevalence 0.03672 0.00000 0.000000
Balanced Accuracy 0.95980 0.50000 0.500000
Class: glia-maybeOligo
Sensitivity 0.833333
Specificity 1.000000
Pos Pred Value 1.000000
Neg Pred Value 0.998768
Prevalence 0.007344
Detection Rate 0.006120
Detection Prevalence 0.006120
Balanced Accuracy 0.916667
[1] "predict test data"
Confusion Matrix and Statistics
Reference
Prediction earlyDA-NPC earlyGlia Neurons Astrocytes stem-like
earlyDA-NPC 23 0 0 0 1
earlyGlia 0 17 0 0 0
Neurons 0 0 12 0 0
Astrocytes 0 0 0 29 0
stem-like 0 1 0 0 10
epithelial 0 0 0 0 1
earlyRG 0 0 0 0 0
DAneurons 0 0 0 0 0
RG-astro 0 1 0 0 0
DA-NPC 1 0 0 0 0
earlyNeurons 0 0 0 0 0
epithelial-endothelial 0 0 0 0 0
Glia 0 0 0 0 0
NPC 0 0 0 0 0
OPC 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0
glia-maybeOligo 0 0 0 0 0
Reference
Prediction epithelial earlyRG DAneurons RG-astro DA-NPC earlyNeurons
earlyDA-NPC 0 1 1 1 0 0
earlyGlia 0 0 0 0 0 0
Neurons 1 0 0 0 0 1
Astrocytes 0 0 0 1 0 0
stem-like 0 1 0 2 0 1
epithelial 16 0 0 0 0 1
earlyRG 0 6 0 0 0 0
DAneurons 0 0 0 0 0 0
RG-astro 1 0 0 3 0 0
DA-NPC 0 0 9 5 11 0
earlyNeurons 0 0 0 0 0 5
epithelial-endothelial 0 0 0 0 0 0
Glia 0 0 0 0 0 0
NPC 1 0 0 0 0 0
OPC 0 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0 0
glia-maybeOligo 1 0 0 0 0 0
Reference
Prediction epithelial-endothelial Glia NPC OPC epithelial-maybeOligo
earlyDA-NPC 1 0 0 0 0
earlyGlia 0 0 0 0 0
Neurons 0 0 0 0 0
Astrocytes 0 0 0 0 0
stem-like 0 0 0 1 1
epithelial 1 0 0 3 0
earlyRG 0 0 0 0 0
DAneurons 0 0 0 0 0
RG-astro 0 1 0 0 0
DA-NPC 1 1 0 0 0
earlyNeurons 0 0 1 0 0
epithelial-endothelial 2 0 0 0 0
Glia 0 0 0 0 0
NPC 0 0 4 0 0
OPC 0 0 0 0 0
epithelial-maybeOligo 0 0 0 0 0
glia-maybeOligo 0 0 0 0 0
Reference
Prediction glia-maybeOligo
earlyDA-NPC 0
earlyGlia 0
Neurons 0
Astrocytes 0
stem-like 0
epithelial 0
earlyRG 0
DAneurons 0
RG-astro 0
DA-NPC 0
earlyNeurons 0
epithelial-endothelial 0
Glia 0
NPC 0
OPC 0
epithelial-maybeOligo 0
glia-maybeOligo 1
Overall Statistics
Accuracy : 0.7596
95% CI : (0.691, 0.8195)
No Information Rate : 0.1585
P-Value [Acc > NIR] : < 2.2e-16
Kappa : 0.7342
Mcnemar's Test P-Value : NA
Statistics by Class:
Class: earlyDA-NPC Class: earlyGlia Class: Neurons
Sensitivity 0.9583 0.8947 1.00000
Specificity 0.9686 1.0000 0.98830
Pos Pred Value 0.8214 1.0000 0.85714
Neg Pred Value 0.9935 0.9880 1.00000
Prevalence 0.1311 0.1038 0.06557
Detection Rate 0.1257 0.0929 0.06557
Detection Prevalence 0.1530 0.0929 0.07650
Balanced Accuracy 0.9634 0.9474 0.99415
Class: Astrocytes Class: stem-like Class: epithelial
Sensitivity 1.0000 0.83333 0.80000
Specificity 0.9935 0.95906 0.96319
Pos Pred Value 0.9667 0.58824 0.72727
Neg Pred Value 1.0000 0.98795 0.97516
Prevalence 0.1585 0.06557 0.10929
Detection Rate 0.1585 0.05464 0.08743
Detection Prevalence 0.1639 0.09290 0.12022
Balanced Accuracy 0.9968 0.89620 0.88160
Class: earlyRG Class: DAneurons Class: RG-astro Class: DA-NPC
Sensitivity 0.75000 0.00000 0.25000 1.00000
Specificity 1.00000 1.00000 0.98246 0.90116
Pos Pred Value 1.00000 NaN 0.50000 0.39286
Neg Pred Value 0.98870 0.94536 0.94915 1.00000
Prevalence 0.04372 0.05464 0.06557 0.06011
Detection Rate 0.03279 0.00000 0.01639 0.06011
Detection Prevalence 0.03279 0.00000 0.03279 0.15301
Balanced Accuracy 0.87500 0.50000 0.61623 0.95058
Class: earlyNeurons Class: epithelial-endothelial Class: Glia
Sensitivity 0.62500 0.40000 0.00000
Specificity 0.99429 1.00000 1.00000
Pos Pred Value 0.83333 1.00000 NaN
Neg Pred Value 0.98305 0.98343 0.98907
Prevalence 0.04372 0.02732 0.01093
Detection Rate 0.02732 0.01093 0.00000
Detection Prevalence 0.03279 0.01093 0.00000
Balanced Accuracy 0.80964 0.70000 0.50000
Class: NPC Class: OPC Class: epithelial-maybeOligo
Sensitivity 0.80000 0.00000 0.000000
Specificity 0.99438 1.00000 1.000000
Pos Pred Value 0.80000 NaN NaN
Neg Pred Value 0.99438 0.97814 0.994536
Prevalence 0.02732 0.02186 0.005464
Detection Rate 0.02186 0.00000 0.000000
Detection Prevalence 0.02732 0.00000 0.000000
Balanced Accuracy 0.89719 0.50000 0.500000
Class: glia-maybeOligo
Sensitivity 1.000000
Specificity 0.994505
Pos Pred Value 0.500000
Neg Pred Value 1.000000
Prevalence 0.005464
Detection Rate 0.005464
Detection Prevalence 0.010929
Balanced Accuracy 0.997253
saveRDS(rf, paste(output_path,"trainedRFMfromTimeCourseSub.Rds",sep =""))
Now I will use the full dataset The cell types will be more clear with the full data set.
# prepare a dataframe for stats
# this function takes the annotated seurat object with all the variables already existing as metadata slots
# check what meta data slots exist in your object
colnames(seu@meta.data)
[1] "orig.ident" "nCount_RNA" "nFeature_RNA" "Sample"
[5] "RNA_snn_res.0.5" "RNA_snn_res.8.1" "seurat_clusters" "RNA_snn_res.0.9"
[9] "RNA_snn_res.1" "cor.labels" "rfm.labels" "seu.pred"
[13] "CellType" "Celltypes2" "CelltypesMain" "Replicate"
[17] "Days_in_FD"
# run the function
var.names <- c("Days_in_FD","Sample","Replicate","CelltypesMain")
df.for.stats <- Prep_for_stats(seu, marker_list = AB, variables = var.names,
marker_name = 'Marker')
# save the csv for later
# write.csv(df.for.stats, paste(output_path,"filename.csv"))
head(df.for.stats)
NA
NA
First we have 3 variables: Experimental variable (Days in culture), Cell types, Markers We want to compare the mean expression per group: For all antibodies together in each cell type between a given variable (Genotype) (One way anova) We want to compare each antibody separately for a given variable for each cell type (two way anova)
# one way anova (combine all antibodies)
# two way anova variable 1 = antibody/marker variable 2 = group variable
# normally runs a loop across each cell type
# option to select to calculate for all cell types together
# can run the loop across antibodies
# group variables we can run: Genotype, Batch, days in culture, Experiment date
# we run one-way here with different conditions
# compare genotypes for each cell type
test.stats1 <- run_stats(input_df= df.for.stats, group_cols = c("Sample", "CelltypesMain","Marker","Days_in_FD","Replicate"),
value_col = "value",
stat_type = "ANOVA", id1 = 'Days_in_FD',
id2 = NULL, use_means = TRUE,
loop_by = "CelltypesMain")
[1] "ANOVA results for all celltypes and markers combined"
[1] "TukeyHSD results for all celltypes and markers combined"
# see the dataframe results
test.stats1[['ANOVA']]
test.stats1[['TukeyHSD']]
NA
NA
NA
Overall effect we can see a significant effect of Days in culture on cell types In pair wise conparisons only 30 vs 100 days is dfferent.
# Compare expression across cell types for each marker
test.stats2 <- run_stats(input_df= df.for.stats, group_cols = c("Sample", "CelltypesMain","Marker","Days_in_FD"),
value_col = "value",
stat_type = "ANOVA", id1 = 'Days_in_FD',
id2 = NULL, use_means = TRUE,
loop_by = "Marker")
Error in h(simpleError(msg, call)) :
error in evaluating the argument 'filter' in selecting a method for function 'filter': object 'Marker' not found
# compare genotype for each cell type without taking the group means and using each cell as an n (not good practice)
test.stats4 <- run_stats(input_df= df.for.stats, group_cols = c("Sample", "CellType","Marker","Genotype","Batch"),
value_col = "value",
stat_type = "ANOVA", id1 = 'Genotype',
id2 = NULL, use_means = FALSE,
loop_by = "CellType")
test.stats4[[1]] # ANOVA
Test two way ANOVAs
test.stats5 <- run_stats(input_df= df.for.stats, group_cols = c("Sample", "CelltypesMain","Days_in_FD","Marker"),
value_col = "value",
stat_type = "ANOVA2", id1 = 'Days_in_FD',
id2 = "Marker", use_means = TRUE,
loop_by = "CellType")
Warning: Unknown or uninitialised column: `CellType`.
Error in `colnames<-`(`*tmp*`, value = c("Celltype", "Contrast", "Df", :
attempt to set 'colnames' on an object with less than two dimensions
test.stats6 <- run_stats(input_df= df.for.stats, group_cols = c("Sample", "CellType","Marker","Genotype","Batch"),
value_col = "value",
stat_type = "ANOVA2", id1 = 'Genotype',
id2 = "CellType", use_means = TRUE,
loop_by = "Marker")
# see the interactions Tukey's results where id1 or id2 match
df <- as.data.frame(test.stats6[["TukeyHSD"]][["Interactions_ Genotype"]])
head(df)
# now filter for significant differences
df_sig <- df %>% filter(p.adj < 0.05)
df_sig
df <- as.data.frame(test.stats6[["TukeyHSD"]][["Interactions_ CellType"]])
head(df)
# now filter for significant differences
df_sig <- df %>% filter(p.adj < 0.05)
df_sig
Train Random Forest model Requires a labelled seurat object More cells will give higher accuracy but increase computation time. Run in HPC with lots of cells
save(rf, paste(output_path,"trainedRFMfrom9MOsubsetOverlapPanel.Rds",sep = ""))
Error in save(rf, paste(output_path, "trainedRFMfrom9MOsubsetOverlapPanel.Rds", :
object ‘paste(output_path, "trainedRFMfrom9MOsubsetOverlapPanel.Rds", sep = "")’ not found
NA